<div>
  <form class="form-horizontal" role="form" name="myForm" novalidate ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:270px;" ng-class="{'shou':!sumRuleByAlaOT.showSearchPanel}"
           ng-switch
           on="sumRuleByAlaOT.timeType">
        <div>
          <md-input-container flex>
            <label>开始时间</label>
            <input type="date" ng-model="sumRuleByAlaOT.params.startTime"  time-validate="day"
                   end-time="sumRuleByAlaOT.params.endTime"
                   required name="startTime">

            <div ng-messages="myForm.startTime.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <md-input-container flex>
            <label>结束时间</label>
            <input type="date" ng-model="sumRuleByAlaOT.params.endTime" time-validate="day"
                   start-time="sumRuleByAlaOT.params.startTime"
                   required name="endTime">

            <div ng-messages="myForm.endTime.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <label style="width:70px">业务线</label>
          <md-select ng-model="sumRuleByAlaOT.params.businessLineCode">
            <md-option ng-value="0">全部</md-option>
            <md-option ng-value="bl.businessLineCode" ng-repeat="bl in sumRuleByAlaOT.businessLineList">
              {{bl.businessLineName}}
            </md-option>
          </md-select>
        </div>
        <div style="width: 300px;">
          <label style="width:70px">省公司</label>
          <md-select multiple ng-model="sumRuleByAlaOT.params.provincialCompanyCodes">
            <md-select-label>
              {{sumRuleByAlaOT.params.provincialCompanyCodes.length ?
              _getNames(sumRuleByAlaOT.params.provincialCompanyCodes,'provinceName',sumRuleByAlaOT.provincialCompanyList)
              :'全部'}}
            </md-select-label>
            <md-option ng-value="" ng-click="_checkAll(sumRuleByAlaOT.params,'provincialCompanyCodes')">全部
            </md-option>
            <md-option ng-value="pc" ng-repeat="pc in sumRuleByAlaOT.provincialCompanyList">{{pc.provinceName}}
            </md-option>
          </md-select>
        </div>
        <md-radio-group ng-model="sumRuleByAlaOT.params.alarmType" style="height: 42px;margin-top: 33px;">
          <md-radio-button value="告警总数" class="md-primary" style="display:inline-block;" ng-click="sumRuleByAlaOT.resetAlarmType()">告警总数</md-radio-button>
          <md-radio-button value="1"  style="display:inline-block;">告警类型</md-radio-button>
        </md-radio-group>
        <div style="display:inline-block;">
          <md-input-container style="display:inline-block;margin-top: 20px;">
            <input maxlength="20" ng-model="sumRuleByAlaOT.alarmType" ng-disabled="sumRuleByAlaOT.params.alarmType==='告警总数'"  type="text">
          </md-input-container>
        </div>

      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="sumRuleByAlaOT.showSearchPanel"
         ng-click="sumRuleByAlaOT.hideSearchPanel()" ng-hide="myForm.$invalid||sumRuleByAlaOT.hideLittleUp"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="sumRuleByAlaOT.search()"
                 class="md-fab md-primary md-hue-1"
                 aria-label="Profile">
        <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"
           ng-show="!sumRuleByAlaOT.showSearchPanel"></i>
        <i class="glyphicon glyphicon-search" ng-show="sumRuleByAlaOT.showSearchPanel"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <div>
      <div class="menus" ng-show="sumRuleByAlaOT.showIcon">
        <md-button aria-label="列表" id='ta' ng-click="sumRuleByAlaOT.changeViewType('table')" class="md-raised ico-btn">
          <img src="images/tables.png">
        </md-button>
        <md-button aria-label="图表" id='cha' ng-click="sumRuleByAlaOT.changeViewType('chart')" class="md-raised ico-btn">
          <img src="images/charts.png">
        </md-button>
        <form action="{{exportUrl}}" target="_black" method="post"
              style="display: initial;">
          <input type="hidden" name="data" value="{{sumRuleByAlaOT.sendData}}">
          <md-button type="submit" class="md-raised">导出Excel</md-button>
        </form>
      </div>
      <div ng-show="sumRuleByAlaOT.showDataByHourBtn">
        <md-button ng-click="sumRuleByAlaOT.back()" class="md-raised" id="backBtn">返回</md-button>
      </div>
      <div ng-show="sumRuleByAlaOT.viewType === 'chart'" style="padding: 0 16px;">
        <div id="sumRuleByAlaOTChart" style="position:relative; height:450px; width:1197px;"></div>
      </div>
      <div ng-show="sumRuleByAlaOT.viewType === 'table'">
        <div class="table-detail">
          <div class="t_r">
            <table class="table table-bordered">
              <caption style="text-align:center;font-size:large;font-weight:bold;color:black">
                {{sumRuleByAlaOT.title}}
              </caption>
              <tr>
                <th width="15%">时间</th>
                <th>业务线</th>
                <th>省公司</th>
                <th>告警类型</th>
                <th>告警数量(条)</th>
              </tr>
              </thead>
              <tbody>
              <tr ng-repeat="data in sumRuleByAlaOT.alaDataList">
                <td class="diffcount-td" ng-repeat="d in data track by $index">
                  <div style="width:100%;" ng-if="$index===2 && d.length>9" title="{{d}}">{{d.substring(0,8)}}...</div>
                  <div style="width:100%;" ng-if="$index!==2">{{d}}</div>
                  <div style="width:100%;" ng-if="$index===2 && d.length<=9">{{d}}</div>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>